/*
 * ImageApplication.java
 * 
 * Created on 2007-10-18, 21:37:45
 * 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package info.mikrotubula.server;

import org.restlet.Application;
import org.restlet.Context;
import org.restlet.Restlet;
import org.restlet.Router;

/**
 *
 * @author Krystian
 */
public class ImageApplication extends Application {

    public static final String ROOT_URI = "file:///D:/Images/";

    public ImageApplication(Context context) {
        super(context);
    }

    
    
    @Override
    public Restlet createRoot() {
                Router router = new Router(getContext());

                router.attach("/upload", new ImageUpload());
                router.attach("/images/{imageSource}", new PublicImagesServer());
                router.attach("/{userId}/{imageName}", new RegisteredImagesServer());
                return router;
    }
    

}
